# Maintainer: Antonio Rojas <arojas@archlinux.org>

pkgname=lcalc
pkgver=2.0.5
pkgrel=2
pkgdesc='C++ L-function class library and command line interface'
arch=(loong64 x86_64)
url='https://gitlab.com/sagemath/lcalc'
license=(GPL2)
depends=(pari)
makedepends=(gengetopt)
source=(https://gitlab.com/sagemath/lcalc/-/archive/$pkgver/$pkgname-$pkgver.tar.gz)
sha256sums=('c64b7284d688cf8986a64bbf0bc802f6efc70c26693fd0d6e3f155b90d5e5a95')

prepare() {
  cd $pkgname-$pkgver
  autoreconf -fi
}

build() {
  cd $pkgname-$pkgver
  ./configure --prefix=/usr \
    --with-pari
  make
}

package() {
  cd $pkgname-$pkgver
  make DESTDIR="$pkgdir" install
}
